import request from '@/utils/request'
export const getPermission = () => request.get('/sys/permission')
// 增
export const addPermission = data => request.post('/sys/permission', data)
// 删
export const delPermission = id => request.delete('/sys/permission/' + id)
// 查
export const getPermissionDetail = id => request.get('/sys/permission/' + id)
// 改
export const updatePermission = data => request.put('/sys/permission/' + data.id, data)

export function assignPerm(data) {
  return request({
    url: '/sys/role/assignPrem',
    method: 'put',
    data
  })
}

